package entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
import java.util.Date;

/**
 * 实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Newsinfo ", description = "实体类")
public class Newsinfo {


    @ApiModelProperty(hidden = true)
    private String id;


    @NotEmpty(message = "新闻标题不能为空")
    @ApiModelProperty(name = "title", value = "新闻标题", example = "")
    private String title;


    @ApiModelProperty(name = "createUserId", value = "创建者ID", example = "")
    private String createUserId;


    @NotEmpty(message = "创建者昵称不能为空")
    @ApiModelProperty(name = "createUserNickName", value = "创建者昵称", example = "")
    private String createUserNickName;


    @NotEmpty(message = "新闻内容不能为空")
    @ApiModelProperty(name = "newsContent", value = "新闻内容", example = "")
    private String newsContent;


    @ApiModelProperty(name = "createTime", value = "创建时间", example = "")
    private Date createTime;


    @ApiModelProperty(name = "updateUserId", value = "修改人ID", example = "")
    private String updateUserId;


    @ApiModelProperty(name = "updateTime", value = "修改时间", example = "")
    private Date updateTime;


    @ApiModelProperty(name = "viewNum", value = "浏览量", example = "")
    private Integer viewNum;


    @ApiModelProperty(name = "isDeleted", value = "", example = "")
    private Integer isDeleted;


    @ApiModelProperty(name = "checkStatus", value = "审核状态 0待审核 1待发布 2已删除", example = "")
    private Integer checkStatus;


    @ApiModelProperty(name = "commentNum", value = "评论数", example = "")
    private Integer commentNum;


    @NotEmpty(message = "新闻分类不能为空")
    @ApiModelProperty(name = "categoryId", value = "新闻分类", example = "")
    private String categoryId;


    @NotEmpty(message = "新闻主图不能为空")
    @ApiModelProperty(name="newsImage",value="新闻主图",example="")
    private String newsImage;


    @NotEmpty(message = "新闻简介不能为空")
    @ApiModelProperty(name="simpleDescribe",value="新闻简介",example="")
    private String simpleDescribe;
}
